import { segment } from "oicq";
import fetch from "node-fetch";

//项目路径
const _path = process.cwd();

//简单应用示例

//1.定义命令规则
export class out extends plugin {
  constructor () {
    super({
      name: 'out',
      dsc: 'out',
      event: 'message',
      priority: -5000,
      rule: [
        {
          reg: "195296579",
          fnc: 'out'
        },       
      ]
    })

  }


 async  out(e) {
  //e.msg 用户的命令消息
  console.log("用户命令：", e.msg);
  //执行的逻辑功能
  let url = `https://img0.baidu.com/it/u=3046021306,562153592&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500`;
  
  let msg = [ 
    segment.at(e.user_id),
	 "\n达咩！！",	
    segment.image(url),
  ];
    
  //发送消息
  e.reply(msg);
  
  return true; //返回true 阻挡消息不再往下
    }   
}